package com.xxxx.service;


import com.baomidou.mybatisplus.extension.service.IService;
import com.xxxx.pojo.Admin;
import com.xxxx.pojo.R;
import com.xxxx.pojo.Role;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author chao
 * @since 2022-09-26
 */
public interface AdminService extends IService<Admin> {



    Admin getAdminByUsername(String username);

    R login(String username, String password, String code, HttpServletRequest request);


    /**
     * 根据用户id查询角色
     * @param adminId
     * @return
     */
    List<Role> getRoles(Integer adminId);

    /**
     * 获取所有操作员
     * @param keywords
     * @return
     */
    R getAllAdmins(String keywords);

    /**
     * 更新操作员角色
     * @param adminId
     * @param rids
     * @return
     */
    R update(Integer adminId, Integer[] rids);

    R updateAdminPassword(String ordPass, String pass, Integer adminId);
}
